/*
    日志等级类：描述日志等级信息，将日志等级转化为字符串，便于日治消息的打印
*/
#ifndef __M_LEVLE_H__
#define __M_LEVLE_H__
#include<iostream>
#include<string>
namespace zxlog{
    class LogLevel{
        public:
        enum class Value{
            DEBUG = 0,
            INFO,
            WARN,
            ERROR,
            FATAL
        };
        //静态函数不用创建类对象，直接访问
        static std::string toString(zxlog::LogLevel::Value l)
        {
            switch(l)
            {
                case Value::DEBUG:return "DEBUG";break;
                case Value::INFO:return "INFO";break;
                case Value::WARN:return "WARN";break;
                case Value::ERROR:return "ERROR";break;
                case Value::FATAL:return "FATAL";break;
                default:return "UNKNOW";break;
            }
            return "UNKNOW";
        }
    };
}
#endif
